<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@include file="../../mytags.jsp"%>
<t:base type="jquery"></t:base>
<script type="text/javascript" src="${webRoot}js/jquery.raty.js"></script>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>巡检评价</title>
</head>
<body>
<div class="mui-clearfix"></div>
<div class="scor mui-clearfix">
    <c:if test="${not empty plan}">
        <c:if test="${not empty plan.engineer.tsBaseUser.headFileLogId}">
            <img src="fileUploadController.do?downLoadFile&fileLogId=${plan.engineer.tsBaseUser.headFileLogId}">
        </c:if>
        <c:if test="${empty plan.engineer.tsBaseUser.headFileLogId}">
            <img src="${webRoot}images/toux.png">
        </c:if>
        <div class="sc1">
            <h2>${plan.engineer.tsBaseUser.realName}</h2>
            <%--<h3><span style="color:#a6aaab ; font-size: 12px; font-weight: normal;">微信号：HELLO</span>--%>
            </h3>
        </div>
    </c:if>
    <%--<img src="${webRoot}images/toux.png">--%>

    <div class="mui-clearfix"></div>
    <h1>巡检总体评价<span>
        <div id="lastEvaluate" class="raty"></div>
        <%--<img src="${webRoot}images/dax.png"><img src="${webRoot}images/dax.png"><img src="${webRoot}images/dax.png"><img src="${webRoot}images/dax.png"><img src="${webRoot}images/dax.png">--%>
    </span></h1>
</div>

<div class="set2">
    <ul class="mui-table-view view1">
        <li class="mui-table-view-cell cell1 c6">
            <span>服务态度</span>
            <div class="pfx">
                <h4>
                    <div id="serviceEvaluate" class="raty"></div>
                    <%--<img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx1.png"><img src="${webRoot}images/pfxx1.png">--%>
                </h4>
                <div class="mui-clearfix"></div>
                <h3>准时上门，仪容整洁并佩戴工牌；工作认真，态度礼貌</h3>
            </div>
        </li>
        <li class="mui-table-view-cell cell1 c6">
            <span>沟通顺畅</span>
            <div class="pfx">
                <h4>
                    <div id="talkEvaluate" class="raty"></div>
                    <%--<img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png">--%>
                </h4>
                <div class="mui-clearfix"></div>
                <h3>告知客户相关巡检流程，认真解答客户问题</h3>
            </div>
        </li>
        <li class="mui-table-view-cell cell1 c6">
            <span>巡检效果</span>
            <div class="pfx">
                <h4>
                    <div id="effectEvaluate" class="raty"></div>
                    <%--<img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx1.png">--%>
                </h4>
                <div class="mui-clearfix"></div>
                <h3>完成全部巡检内容，巡检效果明显</h3>
            </div>
        </li>
        <li class="mui-table-view-cell cell1 c6">
            <span>培训效果</span>
            <div class="pfx">
                <h4>
                    <div id="trainEvaluate"  class="raty"></div>
                    <%--<img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx1.png"><img src="${webRoot}images/pfxx1.png">--%>
                </h4>
                <div class="mui-clearfix"></div>
                <h3>培训全面、讲解清楚</h3>
            </div>
        </li>
        <li class="mui-table-view-cell cell1 c6">
            <span>技能</span>
            <div class="pfx">
                <h4>
                    <div id="skillEvaluate" class="raty"></div>
                    <%--<img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png"><img src="${webRoot}images/pfxx.png">--%>
                </h4>
                <div class="mui-clearfix"></div>
                <h3>对巡检结果进行说明，提出专业维护建议</h3>
            </div>
        </li>
    </ul>
</div>
<div class="set2">
    <ul class="mui-table-view view1">
        <li class="mui-table-view-cell cell1 c6">
            <span>评语</span>
            <form id="evaForm" action="">

                <input type="hidden" name="inspection.id" value="${inspectionId}"/>
                <input type="hidden" name="id" value="${evaluate.id}"/>
                <input type="hidden" id="evaluateState" name="evaluateState" value="1"/>
                <input type="hidden" name="lastEvaluate"  value="${evaluate.lastEvaluate}"/>
                <input type="hidden" name="serviceEvaluate" value="${evaluate.serviceEvaluate}"/>
                <input type="hidden" name="talkEvaluate" value="${evaluate.talkEvaluate}"/>
                <input type="hidden" name="effectEvaluate" value="${evaluate.effectEvaluate}"/>
                <input type="hidden" name="trainEvaluate" value="${evaluate.trainEvaluate}"/>
                <input type="hidden" name="skillEvaluate" value="${evaluate.skillEvaluate}"/>
                <input type="hidden" name="evaluateType" value="<%=StaticValue.DIC_EVALUATE_TYPE_ELSE%>"/>
                <div class="pfx">
                    <textarea class=" ww" name="opinion"></textarea>
                </div>
            </form>

        </li>
    </ul>
</div>
<div class="mui-content-padded">
    <a class="mui-btn mui-btn-block mui-btn-primary" onclick="submit()">提交</a>
</div>
</body>
<script type="text/javascript" charset="utf-8">
    function submit(){
        var mask = mui.createMask(function(){
            return false;
        });
        mask.show();
        $.post('inspectionWx.do?doEvalute&'+$("#evaForm").serialize(),{},function(data){
            if(!$.isEmptyObject(data)){
                data = $.parseJSON(data);
                if(data.success){
                    mui.toast("感谢您的评价");
                    setTimeout(function(){
                        mui.openWindow({
                            createNew : true,
                            url : "inspectionWx.do?goMyInspectionList"
                        });
                    },2000);
                }else{
                    mask.close();
                }
            }
        })
    }
    $(function(){
        mui.init();
        $.fn.raty.defaults.path = '${webRoot}js/img';
        $('.raty').raty({number:5,score:5}).css('width',5*40).click(function () {
            $("input[name='"+$(this).attr("id")+"']").val($(this).raty('score'));
        });
        $('.raty').each(function(){
            $("input[name='"+$(this).attr("id")+"']").val($(this).raty('score'));
        })

    })
</script>
</html>
